package com.googlecode.likesql.dml;

import com.googlecode.likesql.SeriallLikeSql;
import com.googlecode.likesql.constant.Keyword;
import com.googlecode.likesql.constant.SqlChar;
import com.googlecode.likesql.context.SerialSqlContext;

public class Select extends SeriallLikeSql{

	public Select(SerialSqlContext context) {
		super(context);
	}
	
	public Select(){
		this(new SerialSqlContext());
	}
	
	public From select(String columns){
		return new From(context
		.append(Keyword.SELECT)
		.appendSP(columns));
	}
	
	public From selectAll(){
		return select(SqlChar.ASTERISK);
	}
	
	public From selectDistinct(String columns){
		return new From(context
		.append(Keyword.SELECT)
		.appendSP(Keyword.DISTINCT)
		.appendSP(columns));
	}

}
